package com.aw.qzblog.entity.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;

import javax.xml.validation.Validator;

/**
 * @TableName article
 */
@TableName(value = "article")
@Data
public class Article implements Serializable {
    /**
     * 文章id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 文章标题
     */
    private String title;

    /**
     * 文章内容
     */
    private String content;

    /**
     * 文章作者id
     */
    @TableField(value = "authorId")
    private Long authorId;

    /**
     * 文章状态,0-草稿 1-完成 2-违规需修改 3-下架
     */
    private Integer status;

    /**
     * 文章浏览量
     */
    @TableField(value = "viewCount")
    private Long viewCount;

    /**
     * 文章点赞数
     */
    @TableField(value = "likeCount")

    private Long likeCount;

    /**
     * 文章评论数
     */
    @TableField(value = "commentCount")

    private Long commentCount;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")

    private Date createTime;

    /**
     * 文章信息更新时间
     */
    @TableField(value = "updateTime")

    private Date updateTime;

    /**
     * 0-默认 1-删除文章
     */
    @TableField(value = "isDeleted")
    @TableLogic
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}